
package conexion;

public interface DBsentencias {

    public static final String login = "SELECT personasid FROM alumnos WHERE legajo=? AND clave=?";
    public static final String devuelveAlumno = "SELECT * FROM alumnos INNER JOIN personas ON (alumnos.personasid = personas.personasid) WHERE alumnos.personasid=?";
    public static final String nuevaPersona = "INSERT INTO personas (nombre, apellido, dni, domicilio) VALUES (?, ?, ?, ?)";
    public static final String maxIdPersona = "SELECT MAX(personasid) AS personasid FROM personas";
    public static final String maxLegajo = "SELECT MAX(legajo) AS legajo FROM alumnos";
    public static final String nuevoAlumno = "INSERT INTO alumnos (personasid, legajo, clave, carrera) VALUES (?, ?, ?, ?)";
    public static final String modificarPersona = "UPDATE personas SET nombre = ?, apellido = ?, dni = ?, domicilio=? where personasid = ?";
    public static final String modificarAlumno = "UPDATE alumnos SET clave = ?, carrera = ? where personasid = ?";
    
    public static final String eliminarAlumnoReal = "DELETE FROM alumno WHERE personasid = ";
    public static final String eliminarPersonaReal = "DELETE FROM persona WHERE personasid = ";
}
